package cn.cerc.sample.config;

import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

import cn.cerc.mis.security.CustomSession;

@Component
@Primary
@Scope(WebApplicationContext.SCOPE_REQUEST)
public class Session extends CustomSession {
    public static final String DefaultCorpNo = "911001";
    public static final String DefaultUserCode = "91100101";

    @Override
    public String getCorpNo() {
        /**
         * 公司别 => 使用手机号码后6位
         */
        return DefaultCorpNo;
    }

    @Override
    public String getUserCode() {
        /**
         * 用户代码 => 使用自己手机号码
         */
        return DefaultUserCode;
    }

}
